<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" type="text/css" href="CSS/all.css"  th:href="@{/CSS/all.css}"/>
    <link rel="stylesheet" type="text/css" href="CSS/login.css"  th:href="@{/CSS/login.css}"/>
    <title>注册</title>
    <style>
        form{
          
            width: 100%;
            margin: 0px auto;
        }
        label{
            display: inline-block;
            width: 90px;
            text-align: right;
            margin-left: -20px;
            color: #6d6c75;
        }
        form>div>input{
            width: calc(85% - 75px);
            height: 32px;
        }
    </style>
</head>
<body>
        <header>
            <div style="position: absolute;padding: 0 10px;height: 28px;margin: 0px 10px;line-height: 28px;font-size: 14px;background-color: #65bbec;border-radius: 3px;width: 30px;    top: calc((100% - 28px) / 2);">
                <a onclick="goback()" style="color: #fff;">返回</a>
            </div>
                    会员注册
            <div style="    color: #fff;position: absolute;padding: 0 10px;width: 30px;height: 28px;margin: 0px 10px;line-height: 28px;text-align: center;border-radius: 3px;right: 0;top: 0;font-size: 14px;background-color: #65bbec;    top: calc((100% - 28px) / 2);">
                <a th:href="@{/Story/getAllCategoryStoryList(isLogin='')}" style="color: #fff;">首页</a>
            </div>
            </header>
            <form action="" th:action="@{/admin/register}" th:object="${user}" method="post">
                <div>
                    <label >账号:</label><input type="text" maxlength="16" required th:field="*{username}" />
                </div>
                <div>    
                    <label >密码:</label><input type="password" maxlength="16" required th:field="*{password}"/>
                </div>
                <div>
                    <label >确认密码:</label><input type="password" maxlength="16" required th:field="*{confirmPasswd}"/>
                </div>
                <div>
                    <label >邮箱:</label><input type="email" maxlength="30" required th:field="*{email}"/>
                </div>
                <label th:text="${error}" style="color: red;font-size: 14px;float: left;margin-left: 24px;width: 200px; margin-top: -20px;" ></label>
                    <input type="submit" value="提交"  style="font-weight:bold" />
                 <input type="button" value="已有账号，点击登录" onclick="gologin()"   style="font-weight:bold" />
            </form>
</body>
</html>
<script>

    function goback(){
        history.back(-1);
    }
    function gologin(){
        location.href='/admin/user'
    }
</script>